/**
 * 
 */
package com.zhihu.search.test;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;

/**
 * @author zhoufox
 *
 */
public class test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		URL my_url;
		try {
			my_url = new URL("http://www.zhihu.com");
			BufferedReader br = new BufferedReader(new InputStreamReader(my_url.openStream()));
			String str = "";
			while (null!=(str=br.readLine())) {
				System.out.println(str);
			}
		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
